package kr.hkit.powerjava.chther21;

import java.util.InputMismatchException;
import java.util.Scanner;

public class DivideByZero {
	public static void main(String[] args) {
		int x;
		int y =0;
		
		Scanner sc = new Scanner(System.in);
		
	
		int result =0;
		
		try{
			System.out.println("피젯수:");
			x = sc.nextInt();
			
			System.out.println("젯수:");
			y= sc.nextInt();
			
			result =x/y;

		}catch(ArithmeticException e){
			System.err.println("젯수는 0으로 나눌수없음");
		}catch(InputMismatchException e){
			System.err.println("문자금지");
		}catch(Exception e){
			System.err.println("aaa");
		}finally{
			System.out.println("나눗셈결과:"+result);
		}
		
	}
}
